package com.zzptc.syl.traffic;

import androidx.appcompat.app.AppCompatActivity;

import android.content.ContentValues;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.Button;

public class Cover extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cover);

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                Boolean isFirst=SharePreUtil.getBoolean(getApplicationContext(), ConstantValue.ISFIRST,true);
                if (isFirst){
                    Intent intent=new Intent(getApplicationContext(),Login.class);
                    startActivity(intent);
                    SharePreUtil.saveBoolean(getApplicationContext(),ConstantValue.ISFIRST,false);
                }else {
                    Intent intent=new Intent(getApplicationContext(),Login.class);
                    startActivity(intent);
                }
                finish();
            }
        },2000);
    }


}